package com.wn.cl.park.controller;

import com.wn.cl.park.model.dto.NowReserveDto;
import com.wn.cl.park.service.IReservationsService;
import com.wn.sddfp.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yellow docker
 * @since 2025-03-11
 */
@RestController
@RequestMapping("/reservations")
public class ReservationsController {

@Autowired
private IReservationsService reserveService;

    /**
     * 预定停车
     */
    @PostMapping("/park")
    public Result parking(@RequestBody NowReserveDto reserveDto){
        reserveService.ReservePark(reserveDto);
        return Result.ok();
    }

    @GetMapping("/my-test")
    public Result myTest(){
        return Result.ok();
    }


}
